package cn.com.dhcc.app.pub.core.job;

import org.apache.log4j.Logger;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import cn.com.dhcc.app.core.exception.ServiceException;
import cn.com.dhcc.app.core.service.Log;
import cn.com.dhcc.app.core.service.Log.LOGTYPE;
import cn.com.dhcc.app.pub.CM;
import cn.com.dhcc.ddi.monitor.service.MonitorService;

public class DeleteHistoryJob implements Job{

	private static Logger logger = Log.getLogger(LOGTYPE.DDI);
	
	@Override
	public void execute(JobExecutionContext context)
			throws JobExecutionException {
		MonitorService monitorService = CM.getBean(MonitorService.class);
		
		try {
			monitorService.deleteHistory();
		} catch (ServiceException e) {
			logger.error("清空历史库失败", e);
		}
		
		
	}
}
